home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
PET
/
S-Super PET
/
(s)tj.d64
/
FRAME.ASM
< prev
next >
Wrap
Assembly Source File
|
2009-01-18
|
3KB
|
138 lines
opt nolist
xdef screen_setup
xref putchar_,tputcurs_
line_length equ 80
crt_origin equ $8000
null equ $00
vertical_bar equ $01
horizontal_bar equ $02
right_bottom equ $03
left_bottom equ $04
left_top equ $05
right_top equ $06
cross_bar equ $0b
blank equ $20
clear_screen equ $0c
screen_setup equ *
pshs y,x,d
ldb #clear_screen
jsr putchar_
ldx #crt_origin+2*line_length
jsr top_line
jsr box
jsr box
jsr box
jsr bottom_line
ldx #text
loop
ldd ,x++
quif eq
pshs x
jsr tputcurs_
puls x
loop
ldb ,x+
quif eq
pshs x
jsr putchar_
puls x
endloop
endloop
puls d,x,y
rts
text equ *
fcb 24,16
fcc "RS 232C Communication Demonstration Program"
fcb 0
fcb 25,22
fcc "Written by Avygdor Moise, Oct 1983."
fcb 0
fcb 4,6
fcc "Current Setup :"
fcb 0
fcb 5,21
fcc "Baud rate ="
fcb 0
fcb 6,21
fcc "Word length ="
fcb 0
fcb 5,46
fcc "Parity ="
fcb 0
fcb 6,46
fcc "Mode ="
fcb 0
fcb 7,1
fcc "+12V"
fcb 0
fcb 1,1
fcb 0
fdb $0000
line equ * ;X=address where , a=text, b=count
loop
sta ,x+
decb
until eq
rts
top_line equ * ;x=address where
lda #left_top
sta ,x+
lda #horizontal_bar
ldb #78
bsr line
lda #right_top
sta ,x+
rts
bottom_line equ * ;x=address where
lda #left_bottom
sta ,x+
lda #horizontal_bar
ldb #78
bsr line
lda #right_bottom
sta ,x+
rts
box equ * ;x=address where
lda #vertical_bar
sta ,x+
lda #blank
ldb #78
bsr line
lda #vertical_bar
sta ,x+
rts